export default {
    constFeature() {
        const msg = 'const feature';
        alert(msg);
    },
    letFeature() {
        let msg = 'let feature';
        alert(msg);
    },
    arrowFeature() {
        const fun = () => 'arrow feature';
        alert(fun());
    },
    deconstructFeature() {
        const arr = ['deconstruct', 'feature'];
        const [first, second] = arr;
        alert(first);
        alert(second);
    },
    templateFeature() {
        const t = 'template';
        alert(`${t} feature`);
    },
    includesFeature() {
        const arr = ['includes', 'feature'];
        if (arr.includes('includes')) {
            alert(arr.join(' '))
        }
    },
    startsWithFeature() {
        const s = 'startsWithFeature';
        if (s.startsWith('starts')) {
            alert(s)
        }
    },
    objectKeysFeature() {
        const obj = {
            a: 1,
            b: 2,
        }
        alert(Object.keys(obj).join(' '))
    },
    promiseFeature() {
        new Promise(resolve => {
            setTimeout(() => {
                resolve('promise feature')
            }, 1000)
        }).then(value => {
            alert(value);
        })
    },
    async asyncAwaitFeature() {
        const value = await new Promise(resolve => {
            setTimeout(() => {
                resolve('async/await feature')
            }, 1000)
        })
        alert(value)
    },
}